﻿using RuoVea.ExCrypt;

namespace RuoVea.Identity.Utils;
/// <summary>
/// 帮助类
/// </summary>
public class ConfigUtil
{
    /// <summary>
    /// nonce 加密
    /// </summary>
    /// <param name="clientId"></param>
    /// <param name="clientSecrets"></param>
    /// <param name="redirectUris">客户端返回的完整地址</param>
    /// <param name="responseType"></param>
    /// <returns></returns>
    public static string EnrNonce(string clientId, string clientSecrets, string redirectUris, string responseType)
    {
        string enrValue = clientId + clientSecrets + redirectUris + responseType + DateTime.Now.ToString("yyyyMMddHH");
        string enrNonce = Md5Crypt.Encrypt(enrValue);
        return enrNonce;
    }
}

